-- GENERATED SPELL FOR [Skulloc Soulgrinder] --


function spell0_22910(pUnit, Event) --@Banish,n/a--
pUnit:FullCastSpellOnTarget(39622,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22910', 8298, 1)
end

function spell1_22910(pUnit, Event) --@Corruption,n/a--
pUnit:FullCastSpellOnTarget(39621,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22910', 24000, 1)
end

function spell2_22910(pUnit, Event) --@Summon Ogre Ghost,Self--
pUnit:FullCastSpellOnTarget(39620,pUnit)
pUnit:RegisterEvent('Sorts_22910', 589, 1)
end

function Sorts_22910(pUnit, Event)
local choix_sorts_22910 = math.random(0, 2)
if choix_sorts_22910 == 0 then
pUnit:RegisterEvent('spell0_22910', 1, 1)
end
if choix_sorts_22910 == 1 then
pUnit:RegisterEvent('spell1_22910', 1, 1)
end
if choix_sorts_22910 == 2 then
pUnit:RegisterEvent('spell2_22910', 1, 1)
end
end

function mob22910_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_22910', math.random(1500, 3000), 1)
end

function mob22910_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22910_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22910_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(22910, 1, 'mob22910_Action')
RegisterUnitEvent(22910, 2, 'mob22910_Leave')
RegisterUnitEvent(22910, 3, 'mob22910_Kill')
RegisterUnitEvent(22910, 4, 'mob22910_Die')
